cmake_minimum_required(VERSION 2.8)
project(fusion)

set(CMAKE_CXX_FLAGS "-Wall -pthread")
set(CMAKE_CXX_STANDARD 11)

include(FindPkgConfig)
pkg_check_modules(3RD REQUIRED libcrypto libcurl liblz4 mysqlclient zlib)
find_package(Boost REQUIRED COMPONENTS system)

add_subdirectory(src)
add_subdirectory(game)
add_subdirectory(external)

include_directories(src external feature game thirdparty thirdparty/lua/include
        ${3RD_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
link_directories(${PROJECT_SOURCE_DIR}/thirdparty/lua
        ${3RD_LIBRARY_DIRS})

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} core game external
        ${3RD_LIBRARIES} ${Boost_LIBRARIES})
